<%-- 
    Document   : edit
    Created on : 10-oct-2013, 17:51:47
    Author     : joelpacheco
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Gedeon Mvc</title>
        <%@include file="../../template/estilos.jsp"%>
        <%@include file="../../template/script.jsp" %>
    </head>
    <body class="page-header-fixed">
        <%@include file="../../template/header.jsp"%>
        <div class="page-container">
            <%@include file="../../template/sidebar.jsp"%>
            <!-- <input id="menu" type="hidden" name="menu" value="rol">-->
            <!--<input id="modulo" type="hidden" name="modulo" value="index">-->
            <div class="page-content">
                <%@include file="../../template/header_module.jsp"%>

                <div class="container-fluid">
                    <div class="row-fluid">
                        <div class="span12">
                            <!-- BEGIN STYLE CUSTOMIZER -->
                            <div class="color-panel hidden-phone">
                                <div class="color-mode-icons icon-color"></div>
                                <div class="color-mode-icons icon-color-close"></div>

                            </div>
                            <!-- END BEGIN STYLE CUSTOMIZER --> 
                            <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                            <h3 class="page-title">
                                Edicion de Proveedores. <small> Módulo de edición de Proveedores</small>
                            </h3>
                        </div>

                        <div id="tab_1" class="tab-pane active">
                            <div class="portlet box blue">
                                <div class="portlet-title">
                                    <div class="caption"><i class="icon-reorder"></i>Form Sample</div>
                                    <div class="tools">
                                        <a class="collapse" href="javascript:;"></a>
                                        <a class="config" data-toggle="modal" href="#portlet-config"></a>
                                        <a class="reload" href="javascript:;"></a>
                                    </div>
                                </div>
                                <div class="portlet-body form">
                                    <!-- BEGIN FORM-->
                                    <form:form class="horizontal-form formdata" commandName="provider" action="edit" method="post">
                                        <h3 class="form-section">Información del nuevo Proveedor</h3>
                                        <div class="row-fluid">
                                            <div class="span6 ">
                                                <div class="control-group">
                                                    <label for="code" class="control-label">Codigo</label>
                                                    <div class="controls">
                                                        <form:input path="code"  placeholder="Codigo del Proveedor"  class="m-wrap span12"></form:input>
                                                        <form:errors path="code" cssClass="m-wrap span12"></form:errors>
                                                        <form:hidden path="id"></form:hidden>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row-fluid">
                                                <!--/span-->
                                                <div class="span6 ">
                                                    <div class="control-group">
                                                        <label for="nombre" class="control-label">Nombre</label>
                                                        <div class="controls">
                                                        <form:input path="name" placeholder="Nombre del Proveedor" class="m-wrap span12"></form:input>
                                                        <form:errors path="name" cssClass="m-wrap span12"></form:errors>
                                                        </div>
                                                    </div>
                                                </div>
                                                <!--/span-->
                                            </div>
                                            <!--/row-->
                                            <!--   <%
                                                String TOKEN = "abcdefghijklmnopqrstuvwxyz987654321ABCDFGHIJKLMNOPQRSTUVWXYZ$?";
                                                int count = TOKEN.length();

                                                Random random = new Random();
                                                StringBuilder stringBuilder = new StringBuilder("");
                                                for (int i = 0; i < count - 20; i++) {
                                                    stringBuilder.append(TOKEN.charAt(random.nextInt(count)));
                                                }
                                        %>-->
                                        <input name="token" type="hidden" value="<%=stringBuilder.toString()%>"/>
                                        <div class="form-actions">
                                            <button class="btn blue" type="submit"><i class="icon-ok"></i>Guardar</button>
                                            <button class="btn gray cleardata" type="button"><i class="icon-trash"></i>Clear</button>
                                            <a href="<c:url value='/provider/index'/>" class="btn red">Cancelar</a>
                                            ${message}
                                        </div>
                                    </form:form>
                                    <!-- END FORM--> 
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <%@include file="../../template/footer.jsp"%>
    </body>
</html>
